PowerTCP SSH and SFTP for .NET
Read(Byte[],Int32,Int32,Object) Method




Buffer where data is to be copied to.
Offset into the buffer.
Number of bytes available in buffer starting at the offset.
Optional parameter useful for passing state information to the Data event in a COM environment.
Reads session data provided by the SSH-2 host using a reference to a buffer that is marshaled by the COM interface.
Syntax
'Declaration
 
Public Overloads Function Read( _
   ByRef buffer() As Byte, _
   ByVal offset As Integer, _
   ByVal count As Integer, _
   ByVal state As Object _
) As Data
'Usage
 
Dim instance As SessionStream
Dim buffer() As Byte
Dim offset As Integer
Dim count As Integer
Dim state As Object
Dim value As Data
 
value = instance.Read(buffer, offset, count, state)
public Data Read( 
   ref byte[] buffer,
   int offset,
   int count,
   object state
)
public: Data* Read( 
   ref byte[]* buffer,
   int offset,
   int count,
   Object* state
) 
public:
Data^ Read( 
   array<byte>^% buffer,
   int offset,
   int count,
   Object^ state
) 

Parameters

buffer
Buffer where data is to be copied to.
offset
Offset into the buffer.
count
Number of bytes available in buffer starting at the offset.
state
Optional parameter useful for passing state information to the Data event in a COM environment.

Return Value

A Data object encapsulating the received data.
Remarks
If Ssh.ThreadingModel is ThreadingModel.ApartmentAsync, this method immediately returns a null value after starting a worker thread that executes the operation asynchronously. The Ssh.Data event is raised containing the result upon completion, or the Ssh.Error event is raised if an exception is thrown. This method is not threadsafe.
See Also

Reference

SessionStream Class
SessionStream Members
Overload List


PowerTCP SSH and SFTP for .NET Documentation Version 7.0
© 2023 Dart Communications. All Rights Reserved.
Send comments on this topic